<template>
  <div class="homelist-page">
    <!-- 内容部分 -->
      <van-cell @click="$router.push(`/detail/${item.art_id}`)">
        <!-- 使用 title 插槽来自定义标题 -->
        <template #title>
          <div  class="custom">
            <div class="custom-title">
              <span >{{ item.title }}</span>
            </div>
            <img v-for="imgitem in item.cover.images" :key="imgitem.id" :src="imgitem" alt="#">
            <div class="custom-footer">
              <span class="custom-time">{{ item.pubdate }}</span>
            </div>
          </div>
          <!-- <van-tag type="danger">标签</van-tag> -->
        </template>
      </van-cell>
    <!-- <router-view>
      <ArticleComment>
      </ArticleComment>
    </router-view> -->
  </div>
</template>
<script>
// import ArticleComment from './article-comment.vue'
export default {
  // components: { ArticleComment },
  name: 'HomeList',
  props: {
    item: {
      type: Object,
      required: true
    }
  }
}
</script>

<style lang="less" scoped>
.homelist-page{
  .custom{
    .custom-title{
      font-size: 16px;
    }
      img {
        width: 33%;
        height: 100px;
      }
    }

}
</style>
